const Koa = require('./lib/application')
const app = new Koa()

app.use((ctx, next) => {
  console.log(111,ctx.query);
  ctx.body = 'hello'
})

app.listen(3000, () => {
  console.log('服务已启动');
})


// let http = require('http')
// let server = http.createServer((req, res) => {
//   // let data = ajax('xxxxxx')
//   res.end('hello world')
// })
// server.listen(4000)


ctx = {
  url: 'xxx',
  req: {
    url: 'xxx'
  },
  request: {
    req: {
      url: 'xxx'
    },
    url: 'xxx'
  }
}